import React, { useState } from 'react'
import { Form, Input, Row, Col, Button, ConfigProvider, Radio, Modal } from 'antd';
//中文语言包
import zhCN from 'antd/lib/locale/zh_CN';
import '../css/SaleStatusModel.css'

export default function Newaftersalessearch2(props) {
    const { isShow, pHandleOk, pHandleCancel, nowStatus } = props
    const [formLayout] = useState('horizontal');
    //文本输入框
    const { TextArea } = Input;
    //售后状态的显示和隐藏
    const handleOk = () => {
        // 根据当前状态传递不同的数据
        pHandleOk(false);
    };
    const handleCancel = () => {
        pHandleCancel(false);
    };

    const formItemLayout =
        formLayout === 'horizontal'
            ? {
                labelCol: {
                    span: 5,
                },
                wrapperCol: {
                    span: 13,
                },
            }
            : null;
    return (
        <div className='addAale-box'>
            <Modal
                className='addAale-box'
                visible={isShow}
                onOk={handleOk}
                onCancel={handleCancel}
                zIndex={2000}
                footer={false}
            >
                <ConfigProvider locale={zhCN} >
                    <Form {...formItemLayout}
                        className='sale-box2'
                    >
                        {/* 弹框标题 */}
                        <div className='sales2-title'>问题处理</div>
                        {/* 表单内样式 */}
                        <Row justify='center' className='search-box2'>
                            <Col span={5}>
                                {/* 表单内标题 */}
                                <div className='sales2-title2'>售后处理结果</div>
                            </Col>
                            <Col span={19}></Col>
                            <Col span={4}></Col>
                            <Col span={20}>
                                <Form.Item label="相关商品" >
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="关联订单" >
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="反馈主题">
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="售后分类" >
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="联系人">
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="反馈时间">
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="附件"  >
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="备注" labelAlign={'right'} className='.col-box-item' >
                                    <TextArea rows={4} className='textarea-box' />
                                </Form.Item>
                                <Form.Item label="售后状态">
                                    <Radio.Group name="radiogroup" defaultValue={1}>
                                        <Radio value={1}>未处理</Radio>
                                        <Radio value={2}>处理中</Radio>
                                        <Radio value={3}>已处理</Radio>
                                    </Radio.Group>
                                </Form.Item>
                                <Form.Item label="处理时间" labelAlign={'right'} >
                                    <Input placeholder="" />
                                </Form.Item>
                                <Form.Item label="处理结果" labelAlign={'right'} className='.col-box-item' >
                                    <TextArea rows={4} className='textarea-box' />
                                </Form.Item>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={24} className='btn-box'>
                                <Button className='btn2-box1' size='middle' htmlType="submit">保存</Button>
                                <Button className='btn2-box2' size='middle'>关闭</Button>        
                            </Col>
                        </Row>
                    </Form>
                </ConfigProvider>
            </Modal>
        </div >
    )
}

